<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<c-rt:if test="${!empty param.cqtId}">
<c-rt:set var="cqt" value="${pu:get('com.yaodian100.crm.cs.entity.CommonQuestionType', param.cqtId)}"/>
	<c-rt:if test="${!empty param.workFlowNodeId}">
		
		<c-rt:set var="workFlowNode" value="${pu:get('com.yaodian100.crm.workflow.entity.WorkFlowNode', param.workFlowNodeId)}"/>
		<c-rt:if test="${param.allowBackward=='true'}">
		<input type="button" value="回单"  onclick="submitForwardForm(2, '${workFlowNode.parent.responser}', '${param.parentWorkOrderNodeId}')"/>
		</c-rt:if>
		<c-rt:set var="workFlowNodes" value="${workFlowNode.childs}"/>
	</c-rt:if>
	<c-rt:if test="${empty param.workFlowNodeId}">
			<c-rt:set var="params" value="${pu:addToList('paras', cqt.workFlowName)}"/>
			<c-rt:set var="hql">
			from WorkFlowNode where workFlow.name=? and parent is null
			</c-rt:set>
			<c-rt:set var="workFlowNodes" value="${pu:queryByHql(hql, params, null)}"/>
	</c-rt:if>
			<c-rt:if test="${empty workFlowNodes}">
			无法转单
			</c-rt:if>
			<c-rt:forEach items="${workFlowNodes}" var="workFlowNode">
			<input type="button" value="${workFlowNode.shortDesc }"  onclick="submitForwardForm(1, '${workFlowNode.responser}', '${workFlowNode.id}')"/>
			</c-rt:forEach>
	
</c-rt:if>